AudioStreamCallbackImpl

class AudioStreamCallbackImpl(onAudioReadyBlock: (buffer: FloatArray, numFrames: Int) -> Int) : AudioStreamCallback

Constructors

Link copied to clipboard
constructor(onAudioReadyBlock: (buffer: FloatArray, numFrames: Int) -> Int)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open override fun onAudioReady(buffer: FloatArray, numFrames: Int): Int

Called when the audio stream needs data (output) or has data available (input).

Link copied to clipboard
open fun onStreamError(stream: AudioStream, error: KlarinetException)

Called when an unrecoverable error occurs on the stream.

Link copied to clipboard
open fun onStreamStateChanged(stream: AudioStream, state: StreamState)

Called when the stream's lifecycle state changes.

Link copied to clipboard
open override fun onStreamUnderrun(stream: AudioStream, count: Int)

Called when an audio underrun (output) or overrun (input) is detected.